//
//  UILabel+Custom.m
//  XGT
//
//  Created by DemonLee on 15/5/28.
//  Copyright (c) 2015年 Demon. All rights reserved.
//

#import "UILabel+Custom.h"

@implementation UILabel (Custom)




+ (UILabel *)initWithFrame:(CGRect)frame text:(NSString *)text font:(float)fontSize textAlignment:(NSTextAlignment)textAlignment texcolor:(UIColor *)color backgroundColor:(UIColor *)backgroundColor{
    UILabel *nameLabel = [[UILabel alloc]initWithFrame:frame];
    nameLabel.text = text;
    nameLabel.textAlignment = textAlignment;
    nameLabel.font = [UIFont systemFontOfSize:fontSize];
    if (backgroundColor == nil) {
        nameLabel.backgroundColor = [UIColor clearColor];
    }else{
        nameLabel.backgroundColor = backgroundColor;
    }
    nameLabel.textColor = color;
    return nameLabel;
}

@end
